﻿using LitJson;
using System;
using System.IO;
using System.Windows.Forms;
namespace SQLhomework
{
    public partial class StudentMessage : UserControl
    {
        public StudentMessage()
        {
            InitializeComponent();
        }

        private void StudentMessage_Load(object sender, EventArgs e)
        {
            JsonData jsonData = JsonMapper.ToObject(File.ReadAllText("student.json"));
            lab_name.Text = "姓名: "+jsonData["name"].ToString();
            lab_Id.Text = "学号: "+jsonData["ID"].ToString();
            lab_sex.Text ="性别："+jsonData["sex"];
            lab_major.Text = "专业：" + jsonData["major"];
            string temp="";
            temp += jsonData["gradeNum"].ToString()+"-";
            temp += jsonData["classNum"].ToString() + "班";
            lab_class.Text = "班级："+temp;


        }

        private void panel1_Paint(object sender, PaintEventArgs e)
        {

        }
    }
}
